package com.yunkeji.api.user.mapper;

import com.yunkeji.api.user.vo.CountVo;
import com.yunkeji.dao.mapper.PayWithDrawMapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

/**
 * 提现
 *
 * @author 老张
 */
public interface ApiPayWithDrawMapper extends PayWithDrawMapper {

    @Select(
            "SELECT   "
                    + "   SUM( cny_price )  withDrawNum  "
                    + " FROM   "
                    + "   ykj_pay_withdraw    "
                    + "WHERE   "
                    + "   withdraw_date = #{date}    "
                    + "   AND user_id = #{userId} and check_status =2 and pay_status=2 ")
    CountVo.CountWithDrawData countWithDraw(
            @Param("userId") Long userId, @Param("date") String date);
}
